package com.ming.gradle.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/test")
public class TestController {

    @ResponseBody
    @RequestMapping(value = "/test", method = RequestMethod.GET)
    public String test() {
        return "hello,world!";
    }

    @ResponseBody
    @RequestMapping(value = "/test2", method = RequestMethod.POST)
    public String test2() {
        return "hello,world!";
    }

}